<?php get_instance()->view('common/header');?>
<style>
    .weui-cell_swiped>.weui-cell__bd{
        background-color: transparent;
    }
</style>
<body>
<div class="tabcard">
    <a href="javascript:;" class="actived">银行卡</a>
    <a href="javascript:;">支付宝</a>
</div>
<div class="tabcardcons bor_tt">
    <div class="tabcontent actived">
        <?php if (!empty($bank)): foreach ($bank as $k => $v):?>
            <div class="cardcons weui-cell_swiped pr" style="padding:0;background: transparent;" data-id="<?php echo $v['id']?>">
                <div class="weui-cell__bd" style="padding: 1em;background: url(<?php echo $this->staticUrl?>img/png/pic139.png) no-repeat;    background-size: 100%; ">
                    <div class="vCenter mb10">
                        <div class="borimgbox imgbox"><img src="<?php echo $v['icon']?>" alt=""></div>
                        <p class="cor1 ml5"><?php echo $v['open_bank']?></p>
                    </div>
                    <p class="tr cor1 f14"><?php echo $v['account_number']?></p>
                </div>
                <div class="weui-cell__ft">
                    <a class="weui-swiped-btn delete-swipeout ajax-request-btn" alert-message="是否确认删除？"
                       href="<?php echo getUrl('money/rmBankCard?card_id='.$v['id'])?>">
                        <img src="<?php echo $this->staticUrl?>img/png/pic140.png" alt="" style="width: 2.755em;">
                    </a>
                </div>
            </div>
        <?php endforeach; endif;?>
        <div class="weui-cells m0a">
            <a class="weui-cell weui-cell_access afterbor100" href="<?php echo getUrl('money/addBankCard')?>">
                <div class="weui-cell__hd"><img class="heightimg mr5" src="<?php echo $this->staticUrl?>img/png/pic58.png" alt=""></div>
                <div class="weui-cell__bd">
                    <p>添加银行卡</p>
                </div>
                <div class="weui-cell__ft"></div>
            </a>
        </div>
    </div>
    <div class="tabcontent">
        <?php if (!empty($aliPay)): foreach ($aliPay as $kk => $vv):?>
            <div class="cardcons weui-cell_swiped pr" style="padding:0;background: transparent;"  data-id="<?php echo $vv['id']?>">
                <div class="weui-cell__bd" style="padding: 1em;background: url(<?php echo $this->staticUrl?>img/png/pic139.png) no-repeat;background-size: 100%; ">
                    <div class="vCenter mb10">
                        <div class="borimgbox imgbox"><img src="<?php echo $this->staticUrl?>img/png/pic61.png" alt=""></div>
                        <p class="cor1 ml5"><?php echo $vv['account_name']?></p>
                    </div>
                    <p class="tr cor1 f14"><?php echo $vv['account_number']?></p>
                </div>
                <div class="weui-cell__ft">
                    <a class="weui-swiped-btn delete-swipeout ajax-request-btn" alert-message="是否确认删除？"
                       href="<?php echo getUrl('money/rmBankCard?card_id='.$vv['id'])?>">
                        <img src="<?php echo $this->staticUrl?>img/png/pic140.png" alt="" style="width: 2.755em;">
                    </a>
                </div>
            </div>
        <?php endforeach; endif;?>
        <div class="weui-cells m0a">
            <a class="weui-cell weui-cell_access afterbor100" href="<?php echo getUrl('money/addAliPay')?>">
                <div class="weui-cell__hd"><img class="heightimg mr5" src="<?php echo $this->staticUrl?>img/png/pic58.png" alt=""></div>
                <div class="weui-cell__bd">
                    <p>添加支付宝</p>
                </div>
                <div class="weui-cell__ft"></div>
            </a>
        </div>
    </div>
</div>
</body>
<script src="http://192.168.1.35/gebi/static/wx/js/jquery-weui.js"></script>
<script src="<?php echo $this->staticUrl?>js/base.js"></script>
<script type="text/javascript">
    $(function () {
        <?php if ($type == 1):?>
            $(".cardcons").click(function () {
                var vl = $(this).attr('data-id');
                window.location.href = "<?php echo getUrl('money/withdrawals?card_id=')?>"+vl;
            });
        <?php endif;?>
    });
</script>
</html>